package com.dkd.easybook.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dkd.common.annotation.Excel;
import com.dkd.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * 记账列表对象 eb_account
 *
 * @author itheima
 * @date 2024-12-13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class EbAccount extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 记账记录ID
     */
    @TableId(type = IdType.AUTO)
    private Long accountId;
    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private Long userId;
    /**
     * 类别ID
     */
    @Excel(name = "类别ID")
    private Long categoryId;
    /**
     * 金额
     */
    @Excel(name = "金额")
    private BigDecimal amount;
    /**
     * 交易时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交易时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transactionTime;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String note;
    /**
     * 地点
     */
    @Excel(name = "地点")
    private String location;
    /**
     * 标签
     */
    @Excel(name = "标签")
    private String tags;
    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;
    //-----------------以下不是表字段----------------------//
    /**
     * 附件ID
     */
    @TableField(exist = false)
    private List<Long> attachmentIds;
    //附件详情
    @TableField(exist = false)
    private List<EbAttachments> listAttachments;
    //附件数量
    @Excel(name = "附件数量")
    @TableField(exist = false)
    private Integer attachmentCount;
    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    @TableField(exist = false)
    private String userName;
    /**
     * 类别名称
     */
    @Excel(name = "类别名称")
    @TableField(exist = false)
    private String categoryName;

    @TableField(exist = false)
    private String iconUrl;
}
